package com.bjx.controller;

import jakarta.annotation.Resource;
import org.redisson.api.RMap;
import org.redisson.api.RedissonClient;

import org.redisson.client.RedisConnection;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



@RequestMapping("/user")
@RestController
public class UserController {
    @Resource
    private RedissonClient redissonClient;

    @GetMapping("/test")
    String test(){
        RMap<String, Object> map = redissonClient.getMap("map");
        map.put("name", "Lucy");

        return "test";
    }
}
